package com.hzsai.config;

import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;

import java.lang.reflect.Method;

/**
 * hzsai 2019/8/1
 * usage:
 **/
public class MyAsyncUncaughtExceptionHandler implements AsyncUncaughtExceptionHandler {
    @Override
    public void handleUncaughtException(Throwable throwable, Method method, Object... objects) {
        throwable.printStackTrace();
        System.out.println(throwable.getMessage());
        System.out.println(method.getName());
        for (Object obj : objects) {
            System.out.println(obj.toString());
        }
    }
}
